#ifndef SIGN_UP_H
#define SIGN_UP_H

#include <QWidget>
#include <QPushButton>
#include <QComboBox>
#include <QLineEdit>
#include <QLabel>
#include <QFont>
//#include "sql_connect.h"
#include <QRegExp>
#include <QSql>
#include <QDebug>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
#include "patient_signup.h"
namespace Ui {
class sign_up;
}

class sign_up : public QWidget
{
    Q_OBJECT

public:
    explicit sign_up(QWidget *parent = 0);
    ~sign_up();
    QString type_text;
    QString name_text;
    QString sex_text;
    QString identity_text;
    QString phone_text;
    QString passwd_text;
    QSqlQuery query;
private:
    Ui::sign_up *ui;
    QComboBox *type;
    QLabel *TYPE;
    QLabel *name;
     QLineEdit *nameline;
     QComboBox *sex;
     QLabel *sex_lable;
     QLabel *identity;
     QLineEdit *Identity_line;
     QLabel *phone_lable;
     QLineEdit *phone_line;
     QLabel *passwd_lable;
     QLineEdit *passwd_line;
     QPushButton *OK_ptn;
     QPushButton *cencel_ptn;
    int Database_signup();
    bool MYSQL_Connect_signup();
    QSqlDatabase db;
    Patient_SignUp *PSUp;
public slots:
     void OK_ptn_clicked();
     void cencer_ptn_clicked();
     void Change_view();
};

#endif // SIGN_UP_H
